﻿@{
    ViewData["Title"] = "Add";
}
<div id="app">
    <form class="layui-form" action="" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label layui-hide">id 不用显示</label>
            <div class="layui-input-block">
                <input type="text" name="id" autocomplete="off" placeholder="请输入标题" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">菜单名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">控制器名称</label>
                <div class="layui-input-inline">
                    <input type="tel" name="Controller" lay-verify="required" autocomplete="off" class="layui-input" v-model="controller">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">方法名</label>
                <div class="layui-input-inline">
                    <input type="text" name="Action" autocomplete="off" class="layui-input" v-model="actionName">
                </div>
            </div>
            <div class="layui-inline layui-hide">
                <label class="layui-form-label">不显示的ViewPermission</label>
                <div class="layui-input-inline">
                    <input type="text" name="ViewPermission" autocomplete="off" class="layui-input" v-model="viewPermission">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="Sort" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <select name="interest" lay-filter="aihao">
                    <option value="0">启用</option>
                    <option value="1" selected="">不启用</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            </div>
        </div>
    </form>
</div>
<script>
    var vm = new Vue({
        el: "#app",
        data: {
            controller: "",
            actionName:"",
            viewPermission :""
        },
        watch:{
            controller :function(newVal, oldVal) {
                vm.viewPermission = vm.controller + "|" + vm.actionName;

            },
            actionName: function (newVal, oldVal) {
                vm.viewPermission = vm.controller + "|" + vm.actionName;

            }
        },
        computed: {
            
        }

    });

</script>

